import { baseTitle } from '@/config'

export default [
    {
        path: '/',
        name: '',
        redirect: () => '/myapp'
    },
    {
        path: '/myapp',
        name: 'myapp',
        component: () => import('@/view/my-app/my-app.vue'),
        meta: {
            title: `${baseTitle}-应用列表`
        }
    },
    {
        path: '/login',
        name: 'login',
        component: () => import('@/view/login/login.vue'),
        meta: {
            title: `${baseTitle}-登录`
        }
    },
    {
        path: '/:appId/edit',
        name: 'edit',
        component: () => import('@/view/edit/edit.vue'),
        meta: {
            title: `${baseTitle}-编辑`
        }
    },
    {
        path: '/:appId/preview',
        name: 'preview',
        component: () => import('@/view/preview/preview.vue'),
        meta: {
            title: `${baseTitle}-预览`
        }
    },
    {
        path: '/:catchAll(.*)',
        name: '404',
        component: () => import('@/view/error/404.vue'),
        meta: {
            title: `${baseTitle}-404`
        }
    }
]